package org.xx.armory.spring5.jpa;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

public interface ExJpaRepository<T>
        extends JpaRepository<T, Long>, JpaSpecificationExecutor<T> {
    default T getOneOrNull(
            Long id
    ) {
        return id != null ? this.getOne(id) : null;
    }
}
